<div id="main">
	<div id="main_left" class="f_left">
		<div id="bread"><?php echo $bread_crumbs; ?></div>
		<div id="grid_list">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr class="th">
					<td width="50">ID</td>
					<td width="350">标题</td>
					<td width="60">回复</td>
					<td width="60">浏览</td>
					<td width="100">发布时间</td>
					<td>操作</td>
				</tr>
				<?php if(empty($article_list)): ?>
				<tr>
					<td colspan="6">还没有文章...</td>
				</tr>
				<?php else:?>
				<?php foreach($article_list as $list): ?>
				<tr>
					<td><?php echo $list['id'];?></td>
					<td><a href="<?php echo D::createUrl('index/show', array('id'=>$list['id'])) ?>" target="_blank"><?php echo $list['title'];?></a></td>
					<td><?php echo $list['views'];?></td>
					<td><?php echo $list['reply_number'];?></td>
					<td><?php echo date('Y-m-d', $list['create_time']);?></td>
					<td><a href="javascript:;" class="delete" id="<?php echo $list['id'];?>">删除</a></td>
				</tr>
				<?php endforeach ?>
				<?php endif ?>
			</table>
		</div>
		<?php echo $pages; ?>
		<script type="text/javascript">
		$(function(){
			$('.delete').click(function(){
				_this = $(this);
				$.ajax({
					url  : '<?php echo D::createUrl('user/deleteArticle'); ?>',
					type : 'GET',
					dataType : 'json',
					data : {id : _this.attr('id')},
					success : function(data)
					{
						if (data.code == 0) {
							_this.parent().parent().fadeOut(300);
						} else if(data.code == 1) {
							alert(data.msg);
							return false;
						}
					}
				});
			});
		});
		</script>
	</div>
	<div id="sidebar" class="f_left">
		{include file=block/sidebar_index}
	</div>
</div>